<template>
	<view class="content">
		<view class="banner">
			<swiper :indicator-dots="true" 
			        :autoplay="true" 
					indicator-color="rgba(255,255,255,0.5)"
					indicator-active-color="#ff000072b"
					:interval="3000" 
					:duration="500">
				<swiper-item v-for="item,index in swiper" :key = index>
					<view class="swiper-item">
						<image :src="item.url" class="img" mode="heightFix"></image>
						<view class="tag">
							{{item.title}}
						</view>
					</view>
				</swiper-item>
			</swiper>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello',
				swiper:[{url:'https://img.tuguaishou.com/ips_templ_preview/8d/7b/94/lg_720339_1531815748_5b4da74491e7f.jpg?auth_key=2226758400-0-0-2da92f5960beba66d7204d52f0c54c26',
				title:'标题1'},
				{url:'https://img0.baidu.com/it/u=3787376355,3632145978&fm=253&fmt=auto&app=138&f=JPEG?w=750&h=294',
				title:'标题2'},
				{url:'https://img-blog.csdnimg.cn/20210207215102662.jpg?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80NjIyOTI5OA==,size_16,color_FFFFFF,t_70',
				title:'标题3'},
				{url:'https://img.tuguaishou.com/ips_templ_preview/a9/ed/77/lg_4550684_1634181386_6167a10ade10a.jpg!w1024_w?auth_key=2282868942-0-0-3643a29817cf835a9b902068eb286218',
				title:'标题4'},
				{url:'https://picnew11.photophoto.cn/20170608/xiajizhubaoshoushihaibaoshejilunbotaobaozhubaohaibaosucai-25252026_1.jpg',
				title:'标题5'}],
			}
		},
		onLoad() {

		},
		methods: {

		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}
	
	.swiper-item {
		background-color: blue;
		border-radius: 5px;
		
	}
	
	
	.img {
		
	}

	.banner {
		height: 200rpx;
		width: 80%;
		background-color: red;
	}

</style>
